#ifndef _USART_H
#define _USART_H


#include <stdint.h>
#include <stdbool.h>


typedef void (*usart_sent_callback_t)(void);
typedef void (*usart_received_callback_t)(uint8_t data);


void usart_init(void);
void usart_write_data(uint8_t *data, uint16_t length, bool sync);
void usart_write_string(const char* str, bool sync);
void usart_sent_register(usart_sent_callback_t callback);
void usart_received_register(usart_received_callback_t callback);


#endif
